Versions:

  • 1.1.2

gh-autoswitch is a cross-platform command-line utility published by pbrouillet, currently at version 1.1.2, which is the sole version released to date. Written in Rust and distributed as a standalone binary, the software belongs to the developer tools category, specifically the area of Git credential management and GitHub account switching. Its purpose is to solve a common problem for developers who work with multiple GitHub accounts: it acts as a git credential helper that automatically executes `gh auth switch` to activate the correct GitHub account before every HTTPS git remote operation, including push, pull, fetch, and clone. The selection of the appropriate account is determined automatically based on the owner or organization associated with the remote repository, removing the need for manual account switching and reducing the risk of authentication errors or commits pushed under the wrong identity. Because it hooks into git's credential helper mechanism, it integrates transparently into existing workflows that use the GitHub CLI for authentication. In addition to its core switching functionality, gh-autoswitch ships with an interactive terminal user interface built with Ratatui, which allows users to scaffold and edit the tool's YAML configuration file directly from the terminal, as well as to automatically detect the path to the installed `gh` binary. This combination of an automated credential helper and a guided configuration editor makes the tool suitable for developers, open-source contributors, consultants, and anyone who routinely operates across personal and organizational GitHub accounts over HTTPS remotes. Its cross-platform nature means it can be used consistently across supported operating systems, and its YAML-based configuration keeps setup readable and easy to version or share. As a focused single-purpose utility, gh-autoswitch targets teams and individuals seeking reliable, hands-off multi-account management without changing their established git command-line habits.

Tags: